﻿#region Header
// ------------------------ Licence / Copyright ------------------------
// 
// ScrumTable for Scrum Meeting Support
// Copyright © HSR - Hochschule für Technik Rapperswil
// All Rights Reserved
// 
// Author:
//  Michael Gfeller Silvan Gehrig Patrick Boos
// 
// ---------------------------------------------------------------------
#endregion

#region Usings

using System;
using System.Collections.Generic;
using System.ComponentModel;
using ScrumTable.BL.DM.DataManagement;
using ScrumTable.UI.ViewModel.Data;

#endregion

namespace ScrumTable.UI.ViewModel
{
    /// <summary>
    /// Interface for Scrum Items
    /// </summary>
    public interface IScrumItemViewModel<out T> : IViewModelData<T>, IDisposable where T : DomainBase
    {
        #region Properties
        //--------------------------------------------------------------------
        // Properties
        //--------------------------------------------------------------------

        Predicate<object> CanChangeStateTo { get; }

        /// <summary>
        /// provides a object for access customs object. 
        /// This object have to be dynamic object or null!
        /// </summary>
        object CustomFields { get; }

        /// <summary>
        /// Name
        /// </summary>
        string Name { get; }

        /// <summary>
        /// id from the backend system
        /// </summary>
        string BackEndId { get; }

        /// <summary>
        /// Do not use this this property (is dangerous)
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        object this[string name] { get; set; }

        /// <summary>
        /// Description
        /// </summary>
        string Description { get; }

        /// <summary>
        /// Returns the StackRank.
        /// </summary>
        double? Ranking { get; set; }

        /// <summary>
        /// State of the ScrumItem
        /// </summary>
        ScrumState State { get; set;}

        /// <summary>
        /// Gets a value for sorting ScrumItems
        /// </summary>
        double? Sorting { get; }

        /// <summary>
        /// Assigned Member to this items
        /// </summary>
        MemberViewModel AssignedMember { get; set; }

        /// <summary>
        /// Is this item placed on the scrum poker center
        /// </summary>
        bool IsPlacedOnScrumPoker { get; set; }

        DomainCollection<Attachment> Attachments { get; }

        /// <summary>
        /// Contains Errors occurred on this element
        /// </summary>
        IList<DomainSyncErrorInfo> SynchronizationErrors { get; }

        #endregion

        #region Events

        //--------------------------------------------------------------------
        // Events
        //--------------------------------------------------------------------

        #endregion
    }
}